﻿#ifndef PST_DATAHEATGRAPH2DSETTINGS_H
#define PST_DATAHEATGRAPH2DSETTINGS_H

#include "DataModelPost.h"
class QDomElement;
class QDomDocument;
class QDomNodeList;
namespace pst
{
    
    /// @brief 2D热力图形显示设置
    class DataHeatGraph2DSettings : public QObject
    {
        Q_OBJECT

    public:
        Q_INVOKABLE DataHeatGraph2DSettings(QObject* parent = nullptr);
        ~DataHeatGraph2DSettings();

        //void copyData(const DataHeatGraph2DSettings* data);

        void setColorBar(Style2D_ColorBar* data);
        Style2D_ColorBar* getColorBar() const;

        void setXAxisDisplay(Style2D_Axis* data);
        Style2D_Axis* getXAxisDisplay() const;

        void setXAxisRange(Style2D_AxisRange* data);
        Style2D_AxisRange* getXAxisRange() const;

        void setYAxisDisplay(Style2D_Axis* data);
        Style2D_Axis* getYAxisDisplay() const;

        void setYAxisRange(Style2D_AxisRange* data);
        Style2D_AxisRange* getYAxisRange() const;

        void setGrid(Style2D_GridLine* data);
        Style2D_GridLine* getGrid() const;

        void setTitle(Style2D_Title* data);
        Style2D_Title* getTitle() const;

         /// @brief 文件写出至工程文件
        QDomElement& writeToProjectFile(QDomDocument* doc, QDomElement* element, bool isdiso = false);
        /// @brief 从工程文件读入数据
        void readFromProjectFile(QDomElement* element, bool isdiso = false);

    private:
        Style2D_ColorBar* m_colorBar;        //颜色条
        Style2D_Axis* m_xAxisDisplay;    //X轴显示
        Style2D_AxisRange* m_xAxisRange;  //X轴范围
        Style2D_Axis* m_yAxisDisplay;    //Y轴显示
        Style2D_AxisRange* m_yAxisRange;  //Y轴范围
        Style2D_GridLine* m_grid;    //网格线
        Style2D_Title* m_title;  //标题
    };
}
#endif //PST_DATAHEATGRAPH2DSETTINGS_H
